package com.atguigu.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUserDao {

    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring.xml");
        // 根据类型获取接口对应bean
        UserDao userDao = context.getBean("userDao",UserDao.class);
        System.out.println(userDao);
        userDao.run();
    }
}
